package Year22_Month03.day27;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str = sc.nextLine();
            String[] arr = str.split("<br/>");
            String[] arr2 = arr.clone();
            for (int i = 0; i < arr.length; i++) {
                //首先把要转化的数字拿到
                int fun = Integer.valueOf(arr[i]);
                StringBuilder s = new StringBuilder();//这里用s来进行拼接
                for (int j = 2; j < fun; j++) {
                    if(fun % j == 0 && isPrime(j)){//如果这个数字是它的因数并且还是一个质数
                        s.append(j + " * ");
                        fun /= j;
                    }
                }
                s.append(fun);
                arr[i] = String.valueOf(s);
            }
            StringBuilder mys = new StringBuilder();
            for (int i = 0; i < arr.length - 1; i++) {
                mys.append(arr2[i] + " = " +  arr[i] + "<br/>");
            }
            mys.append(arr2[arr2.length - 1] + " = " +arr[arr.length - 1]);
            System.out.println(mys.toString());
        }
    }

    public static boolean isPrime(int a){
        if(a <= 3){
            return a > 1;
        }
        int fun = (int) Math.sqrt(a);
        for (int i = 2; i < fun; i++) {
            if(fun % i== 0){
                return false;
            }
        }
        return true;
    }
}
